﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using WMS_Api.Models;

namespace WMS_Api.Controllers
{
    /// <summary>
    /// 
    /// </summary>
    public class BaseMesApiController : ApiController
    {
        protected MesApiResult Success(string message = "")
        {
            return new MesApiResult
            {
                code = (int)ResultCode.MesSuccess,
                msg = message
            };
        }

        protected MesApiResult Error(string message)
        {
            return new MesApiResult
            {
                code = (int)ResultCode.MesError,
                msg = message,
                nos = null
            };
        }
        protected MesApiResult Error(string message, object nos)
        {
            return new MesApiResult
            {
                code = (int)ResultCode.MesError,
                msg = message,
                nos = nos
            };
        }
    }
}
